package com.wc.AlgoOJ_homework.AlgoOJ_test3.A_致我的批评者;

import java.util.Arrays;
import java.util.Scanner;

/**
 * @Author congge
 * @Date 2024/3/11 19:00
 * @description http://43.138.190.70:8888/p/981?tid=65e5dab127489dab814f76e2
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] a = new int[3];
        int t = sc.nextInt();
        while (t-- > 0) {
            for (int i = 0; i < 3; i++) a[i] = sc.nextInt();
            Arrays.sort(a);
            if (a[1] + a[2] >= 10){
                System.out.println("YES");
            }else {
                System.out.println("NO");
            }
        }
    }
}
